<template>
  <div>
    <el-table :data="getMember" border style="width: 100%">
      <el-table-column prop="id" label="用户编号" width="180"> </el-table-column>
      <el-table-column prop="nickname" label="昵称" width="180"> </el-table-column>
      <el-table-column prop="phone" label="手机号"> </el-table-column>
      <el-table-column prop="status" label="状态">
        <template slot-scope="item">
          <div>
            {{ item.row.status == 1 ? "启用" : "禁用 " }}
          </div>
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="item">
          <div>
            <el-button type="primary" size="mini" plain @click="edit(item.row.id)"
              >编辑</el-button
            >
          </div>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import { memberList } from "../../request/api.js";
import { mapActions, mapGetters } from "vuex";
export default {
  data() {
    return {};
  },
  methods: {
    // 辅助函数
    ...mapActions({
      getMemberListActions: "member/getMemberListActions",
    }),
    edit(id){
      this.$emit('edit', id);
    }
  },
  mounted() {
    this.getMemberListActions();
  },
  watch: {},
  computed: {
    ...mapGetters({
      getMember: "member/getMember",
    }),
  },
  filters: {},
  components: {},
};
</script>
<style scoped></style>
